<!-- 导航条
================================================== -->

<div class="container-fluid">
    <div class="row">
		<nav class="navbar navbar-default">
		  <div class="container">
		    <!-- Brand and toggle get grouped for better mobile display -->
		    <div class="navbar-header">
		      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="http://{$_SERVER['HTTP_HOST']}">欢迎光临{:C('WEB_SITE_TITLE')}!</a>
		    </div>
		
		    <!-- Collect the nav links, forms, and other content for toggling -->
		    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

				<ul class="nav navbar-nav navbar-right">
					<if condition="is_login()">
						
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{:get_username()}<span class="caret"></span></a>
								<ul class="dropdown-menu">
									<li><a href="{:U('User/profile')}"><span class="glyphicon glyphicon-edit"></span> 我的资料</a></li>
									<li><a href="{:U('User/changePassword')}"><span class="glyphicon glyphicon-edit"></span> 修改密码</a></li>
									<li><a href="{:U('User/logout')}"><span class="glyphicon glyphicon-remove-circle"></span> 退出</a></li>
								</ul>
							</li>

					<else/>
							<li>
								<a href="{:U('User/login')}"><span class="glyphicon glyphicon-user"></span> 登录</a>
							</li>
							<li>
								<a href="{:U('User/register')}"><span class="glyphicon glyphicon-pencil"></span> 注册</a>
							</li>
						
					</if>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-th-large"></span> 在线服务 <span class="caret"></span></a>
		          <ul class="dropdown-menu" role="menu">
		            <li><a href="#"><span class="glyphicon glyphicon-info-sign"></span> 在线客服</a></li>
		            <li><a href="#"><span class="glyphicon glyphicon-list-alt"></span> 意见反馈</a></li>
		            <li class="divider"></li>
		            <li><a href="#"><span class="glyphicon glyphicon-question-sign"></span> FAQ</a></li>
		          </ul>
		        </li>
		      </ul>
		    </div><!-- /.navbar-collapse -->
		  </div><!-- /.container-fluid -->
		</nav>
    </div>
    
    <div class="row hidden-xs">
    	<div class="container page-holder">
    		<div class="row">
	    		<div class="col-xs-12 col-sm-4 logo">
                    {:hook('homeLogo')}
	    		</div>
	    		<div class="col-sm-6 col-md-4 pull-right">
                    <form action="{:U('Home/Search/index')}" method="post">
                        <div class="input-group" style="margin-top:1em;">
                            <input name="keyword" type="text" class="form-control" placeholder="输入搜索">
				      <span class="input-group-btn">
				        <button  type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
				      </span>
                        </div>
                    </form>
				</div>
    		</div>
    	</div>	
    </div>
    
    <nav id="navbar" class="row hidden-xs">
		<div class="container nav-onechat">
			<div class="row">
            <ul class="nav">
                <think:nav name="nav">
                	<eq name="nav.group" value="默认分组">
                    <li>
                        <a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>">{$nav.title}</a>
                    </li>
                    </eq>
                </think:nav>
            </ul>
			</div>
        </div>
    </nav>
    
</div>